libxl: make libxl_wait_for_device_model clearer
authorIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 23 Jun 2010 16:04:26 +0000 (17:04 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 23 Jun 2010 16:04:26 +0000 (17:04 +0100)
commitcaaaad749ab5e81c3c90043b6112b290e41e972b
tree6261e2c4c171bd9d9ba3bd611f27b51caf364dbd
parente724c3fa8860de463cfeddca9932571e6cb1883a
libxl: make libxl_wait_for_device_model clearer

at the moment libxl_wait_for_device_model waits on a xenstore watch
before checking the current value of the xenstore node, that might
contain already the value the function was looking for.

This patch changes libxl_wait_for_device_model so that it checks the
value of the xenstore node first, then waits for the watch.

xenstore watch automatically fire one time when you install them for
this exact same purpose, so the previous code is not wrong, but this
version is clearer.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
tools/libxl/libxl_device.c